execute if data entity @s item.components."minecraft:custom_data".guardTowerData{type:"E"} run function vs:system/game_ctrol/guard_tower/ai/attack/-e/attack
execute if data entity @s item.components."minecraft:custom_data".guardTowerData{type:"L"} run function vs:system/game_ctrol/guard_tower/ai/attack/-l/attack with entity @s item.components."minecraft:custom_data".guardTowerData

tag @s remove signal.Attack